﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IceCS.DataStructure.Core.Graphic
{
    /*
     * 邻接矩阵，即通过一个二维数据表示节点之间的关系，实现简单，但是冗余多，如有3个节点，如果每个节点(包括自己)都有联系，则需要一个3 * 3 的矩阵
     *    n1 n2 n3
     * n1 x  1  1
     * n2 1  x  1
     * n3 1  1  x
     */


    /// <summary>
    /// 邻接矩阵
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class GraphAdjMatrix<T> : IGraph<T>
    {
        private VertexNode<T>[] nodes; //顶点数组
        private int numEdges; //边的数目
        private int[,] matrix; //邻接矩阵数组
        public GraphAdjMatrix(int n)
        {
            nodes = new VertexNode<T>[n];
            matrix = new int[n, n];
            numEdges = 0;
        }
        public void AddEdge(VertexNode<T> node1, VertexNode<T> node2, int weight)
        {
            throw new NotImplementedException();
        }

        public int GetCountOfEdge()
        {
            throw new NotImplementedException();
        }

        public int GetCountOfVertexNode()
        {
            throw new NotImplementedException();
        }

        public bool HasEdge(VertexNode<T> node1, VertexNode<T> node2)
        {
            throw new NotImplementedException();
        }

        public void RemoveEdge(VertexNode<T> ndoe1, VertexNode<T> node2)
        {
            throw new NotImplementedException();
        }
    }
}
